<template>
  <div>
    <van-cell
      @click="clickTask(item.taskId)"
      v-for="item in list"
      :key="item.taskId"
      :title="item.ownerShortName + '的' + item.processName"
      label="增加悬赏金可提高医生积极性、响应更快、服务更好"
    >
    </van-cell>
  </div>
</template>

<script>
import { getWorkList } from '@/api/bpm/task'

export default {
  data() {
    return {
      list: []
    }
  },
  async created() {
    const res = await getWorkList({
      page: 1,
      start: 0,
      limit: 20
    }).catch(() => {})

    this.list = res.children
  },
  methods: {
    clickTask(taskId) {
      this.$router.push('/process/' + taskId)
    }
  }
}
</script>
